<?php

use Phinx\Migration\AbstractMigration;

class AddColumnLevelCategoryCapacityInTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table("task")
            ->addColumn("level_category", "string", [
                "limit" => 20,
                "default" => "",
                "null" => false,
                "comment" => "任务等级标识"
            ])
            ->addColumn("capacity_mark", "char", [
                "limit" => 36,
                "default" => "",
                "null" => false,
                "comment" => "产能标识"
            ])
            ->save();
    }

    public function down()
    {
        $this->table("task")->removeColumn("level_category")->removeColumn("capacity_mark")->save();
    }
}
